# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
import tinymce.models


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Advertisement',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),
                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),
                ('is_delete', models.BooleanField(verbose_name='逻辑删除', default=False)),
                ('ad_name', models.CharField(verbose_name='广告名', max_length=30)),
                ('ad_image', models.ImageField(verbose_name='广告图片', upload_to='ad/')),
                ('ad_link', models.CharField(verbose_name='广告位链接', max_length=80)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),
                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),
                ('is_delete', models.BooleanField(verbose_name='逻辑删除', default=False)),
                ('cag_name', models.CharField(verbose_name='商品类别', max_length=30)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='GoodsBrowse',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),
                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),
                ('is_delete', models.BooleanField(verbose_name='逻辑删除', default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='GoodsInfo',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('create_time', models.DateTimeField(verbose_name='创建时间', auto_now_add=True)),
                ('update_time', models.DateTimeField(verbose_name='更新时间', auto_now=True)),
                ('is_delete', models.BooleanField(verbose_name='逻辑删除', default=False)),
                ('goods_name', models.CharField(verbose_name='商品名', max_length=30)),
                ('goods_price', models.DecimalField(max_digits=10, verbose_name='商品价格', decimal_places=2)),
                ('goods_unit', models.CharField(verbose_name='商品单位', max_length=10)),
                ('goods_status', models.BooleanField(verbose_name='商品上架', default=True)),
                ('goods_image', models.ImageField(verbose_name='商品图片', upload_to='')),
                ('goods_brief', models.CharField(verbose_name='商品简述', max_length=100)),
                ('goods_desc', tinymce.models.HTMLField(verbose_name='商品描述')),
                ('goods_look', models.IntegerField(verbose_name='商品浏览量', default=0)),
                ('goods_sales', models.IntegerField(verbose_name='商品销量', default=0)),
                ('goods_cag', models.ForeignKey(verbose_name='所属商品类别', to='goods.Category')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='goodsbrowse',
            name='goods_name',
            field=models.ForeignKey(verbose_name='所属商品名', to='goods.GoodsInfo'),
        ),
        migrations.AddField(
            model_name='goodsbrowse',
            name='user_name',
            field=models.ForeignKey(verbose_name='所属顾客', to='users.User'),
        ),
    ]
